const demo = require(process.argv[2])
console.log('running', demo)
console.log(demo.is_promise())
demo.wait().then(val => {
    console.log("then", val)
}).catch(val => {
    console.log("catch", val)
})
console.log(demo.is_promise())
demo.set_val(234)
console.log("resolving")
demo.resolve()
console.log("resolved")

/*
running {
  wait: [Function (anonymous)],
  set_val: [Function (anonymous)],
  resolve: [Function (anonymous)],
  reject: [Function (anonymous)],
  is_promise: [Function (anonymous)]
}
false
true
resolving
resolved
then [Number: 234]
*/
